package a23_Polymorphic;

/**
 * @Author quan
 * @Description Person类
 * 实现多态要有三个条件： 继承关系，fu f = new zi(); 要有方法重写
 * @Date 2023/2/12 0:02
 */
public class Person {
    private String name;
    private int age;
    public Person(){

    }
    public Person(String name, int age){
        this.name = name;
        this.age = age;
    }
    public void setName(String name){
        this.name = name;
    }
    public String getName(){
        return name;
    }
    public void setAge(int age){
        this.age = age;
    }
    public int getAge(){
        return age;
    }
    public void show(){
        System.out.println(name+","+age);
    }
}
